<!DOCTYPE html>
<html>
<head>
    <title>My Website</title>
</head>
<body>
    <header>
        <h1>Welcome to my website</h1>
        <nav>
            <ul>
                <li><a href="#">Home</a></li>
                <li><a href="#">About</a></li>
                <li><a href="#">Contact</a></li>
            </ul>
        </nav>
    </header>
    <main>
        <section>
            <h2>About me</h2>
            <p>My name is John Doe and I'm a web developer.</p>
        </section>
        <section>
            <h2>My skills</h2>
            <ul>
                <li>HTML</li>
                <li>CSS</li>
                <li>JavaScript</li>
            </ul>
        </section>
    </main>
    <footer>
    </footer>
</body>
</html>

My meme

My meme is made by two meme templates I found on the internet, and I used texts and codes integrated them to a meme.This meme shows the hilarious scenes of some boys pretending to be girls on the internet as a way to date others. These boys use different methods to hide their real identities, such as using female icons, using female names and using female language and meme. The phenomenon of guys pretending to be girls on the Internet is not new. This behavior is usually done to gain some undue advantage, such as deception, fraud or to satisfy vanity, among others. With the popularity of social media and dating apps, there are more and more cases of guys pretending to be girls. The reason I made this meme is to satirize and ridicule this behavior and to remind people about the need to be vigilant when it comes to online friendship.

library(magick)

# 读取两张图片
happy_face <- image_read("https://pbs.twimg.com/media/EX33Kl0XQAEHtwm?format=jpg&name=small")
shock_face <- image_read("https://pbs.twimg.com/media/EX33Kl2WkAAwnen?format=jpg&name=360x360")

# 调整图片大小为600x600像素
happy_face <- image_resize(happy_face, "500x500!")
shock_face <- image_resize(shock_face, "500x500!")

# 创建带文字的空白图像
girl_from_the_internet <- image_blank(width = 500, height = 500, color = "white") %>%
  image_annotate(text = "WHEN YOU DATE A BEAUTIFUL \n GIRL FROM THE INTERNET ", 
                 color = "black", size = 30, gravity = "center")
girl_from_the_internet2 <- image_blank(width = 500, height = 500, color = "black") %>%
  image_annotate(text = "AND YOU MET HER \n IN THE MALE TOILET ", 
                 color = "white", size = 30, gravity = "center")

# 垂直排列图像
top_row <- image_append(c(girl_from_the_internet, happy_face))
bottom_row <- image_append(c(girl_from_the_internet2, shock_face))

# 合并图像并缩放为600像素
meme <- c(top_row, bottom_row) %>%
  image_append(stack = TRUE) %>%
  image_scale("500x500")

# 保存图像为PNG文件
image_write(meme, path = "my_meme.png")

My GIF

My GIF was made based on my memes, I animated the four pictures to a 4FPS gif.

library(magick)

# 读取图片并调整大小
happy_face <- image_read("https://pbs.twimg.com/media/EX33Kl0XQAEHtwm?format=jpg&name=small") %>% 
  image_resize("500x500!")
shock_face <- image_read("https://pbs.twimg.com/media/EX33Kl2WkAAwnen?format=jpg&name=360x360") %>% 
  image_resize("500x500!")
girl_from_the_internet <- image_blank(width=500, height=500, color="#FFFFFF") %>% 
  image_annotate(text = "WHEN YOU DATE A BEAUTIFUL \n GIRL FROM THE INTERNET ", color = "#000000", size = 30, gravity = "center")
girl_from_the_internet2 <- image_blank(width=500, height=500, color="#000000") %>% 
  image_annotate(text = "AND YOU MET HER \n IN THE MALE TOILET ", color = "#FFFFFF", size = 30, gravity = "center")

# 组成帧序列
frame <- c(girl_from_the_internet, happy_face, girl_from_the_internet2, shock_face)

# 将帧序列转换为GIF动画
gif1 <- image_animate(frame, fps = 4)

# 将帧序列逐渐过渡为彼此
gif2 <- image_morph(frame) %>% 
  image_animate(fps = 100)

# 合并为一个动画序列
animation <- c(gif1, gif2)

# 动画序列保存为GIF文件
image_write(animation, "my_animation.gif")